package com.sinoglobal.sinostore.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

import com.sinoglobal.sinostore.R;
import com.sinoglobal.sinostore.StateBaseActivity;

/**
 * @author zrh
 * @title: MyMallActivity.java
 * @package com.chiliring.sinostore.activity
 * @description: 我的商城
 * @date 2015年1月14日 下午7:56:09
 */
public class MyMallActivity extends StateBaseActivity implements OnClickListener {

    View myOrder;

    View manageAddress;

    private View llCollection;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.shop_activity_my_mall);
//		 ViewUtils.inject(this);
        titleView.setText("我的商城");
        openChenJInShi();
        myOrder = getViewById(R.id.myOrder);
        manageAddress = getViewById(R.id.manageAddress);
        llCollection = getViewById(R.id.ll_collection);

        myOrder.setOnClickListener(this);
        manageAddress.setOnClickListener(this);
        llCollection.setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
        int id = v.getId();
        Intent intent = null;
        if (id == R.id.myOrder) {
            intent = new Intent(this, OrderListActivity.class);
            startActivity(intent);
        } else if (id == R.id.manageAddress) {
            intent = new Intent(this, AddressListActivity.class);
            startActivity(intent);
        } else if (id == R.id.ll_collection) {
            toActivity(MyCollectionActivity.class, null);
        }
    }
}
